CROSSTOOLDIR		:=/home/public/au/gateway/release/SDK/openwrt-sdk-ramips-mt76x8_gcc-7.3.0_musl.Linux-x86_64
CROSS   		:= mipsel-openwrt-linux-
export  STAGING_DIR	:= $(CROSSTOOLDIR)/staging_dir
export  PATH		:= $(PATH):$(STAGING_DIR)/toolchain-mipsel_24kc_gcc-7.3.0_musl/bin
CROSS_CFLAGS		:= -I$(CROSSTOOLDIR)/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/usr/include
CROSS_CFLAGS		+= -I$(CROSSTOOLDIR)/staging_dir/target-mipsel_24kc_musl/usr/include
CROSS_LDFLAGS		:= -L$(CROSSTOOLDIR)/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/usr/lib
CROSS_LDFLAGS		+= -L$(CROSSTOOLDIR)/staging_dir/target-mipsel_24kc_musl/usr/lib

TARGET_CFLAGS		:= 	-fno-stack-protector

LIBS :=-lm
LIBS += -lubox -lblobmsg_json -lubus -ljson-c

CC 			:=  	$(CROSS)gcc
CPP 			:=  	$(CROSS)g++
STRIP                   := $(CROSS)strip


u1:
	$(CC) u1.c $(LIBS) $(CROSS_CFLAGS) $(CROSS_LDFLAGS) -o u1

clean:
	rm u1